<layout name='Layout/ace_layout' />
{:W('PageHeader',array('name'=>'权限组管理','search'=>'N'))}
<form id="form_search" name="form_search" method="post" action="">
	<div class="operate panel panel-default">
		<div class="panel-body">
			<div class="pull-left">
				<select name="eq_pid" id="eq_pid" class="form-control col-10" onchange="submit_search();">
					{:fill_option($groupList)}
				</select>
			</div>
			<div class="pull-right">
				<a onclick="save()" class="btn btn-sm btn-primary">保存</a>
			</div>
		</div>
	</div>
</form>
<div class="row">
	<div class="col-sm-4 role_list">
		<table class="table table-bordered">
			<thead>
				<tr>
					<th>名称</th>
				</tr>
			</thead>
			<tbody>
				<volist name="list" id="data">
					<tr id="{$data.id}">
						<td>{$data.name}</td>
					</tr>
				</volist>
			</tbody>
		</table>
	</div>
	<div class="col-sm-8 wrap">
		<form id="form_data" method="post" action="">
			<input type="hidden" name="ajax" id="ajax" value="1">
			<input type="hidden" name="role_id" id="role_id">
			<input type="hidden" name="org_node_list" id="org_node_list">
			<input type="hidden" name="node_list" id="node_list">
			<div class="wrap tree_menu">
				<table class="table table-bordered">
					<tr>
						<th style="width:55%;text-align:center">菜单</th>
						<th style="width:15%;text-align:center">读取</th>
						<th style="width:15%;text-align:center">修改</th>
						<th style="width:15%;text-align:center">管理</th>
					</tr>
					<volist name="node_list" id="data">
						<tr>
							<td><label>
								<input class="ace" type="checkbox"  name="node_id"  value="{$data.id}" />
								<span class="lbl level{$data.level}">&nbsp;{$data.name}</span></label></td>
							<if condition="strpos($data['url'],'/index')||strpos($data['url'],'##')!==false">
								<td class="text-center"><label class="inline">
									<input class="ace" type="checkbox" name="read[]" value="{$data.id}" />
									<span class="lbl"></span></label></td>
								<td class="text-center"><label class="inline">
									<input class="ace" type="checkbox" name="write[]" value="{$data.id}"/>
									<span class="lbl"></span></label></td>
								<td class="text-center"><label class="inline">
									<input class="ace" type="checkbox" name="admin[]" value="{$data.id}"/>
									<span class="lbl"></span></label></td>
								<else/>
								<td class="text-center">&nbsp;</td>
								<td class="text-center">&nbsp;</td>
								<td class="text-center">&nbsp;</td>
							</if>
						</tr>
					</volist>
				</table>
			</div>
		</form>
	</div>
</div>